package cn.monkey.transport.mq.redisson;


import cn.money.transport.mq.MqInboundConfig;
import cn.money.transport.mq.MqOutboundConfig;
import cn.monkey.transport.core.Exchange;
import org.redisson.client.codec.Codec;

public abstract class AbstractRedissonExchangeFactory<EXCHANGE extends RedissonExchange> implements RedissonExchangeFactory<EXCHANGE> {

    protected abstract RedissonInbound newInbound(String key, MqInboundConfig inbound, Codec codec);

    protected abstract RedissonOutbound newOutbound(String key, MqOutboundConfig outbound, Codec codec);

    @Override
    public abstract EXCHANGE apply(String key, Exchange exchange, RedissonTransportConfig redissonTransportConfig);
}
